﻿using Ninject.Modules;
using Synology.DS.Core;
using Synology.DS.Core.DiskStation;
using Synology.DS.Interface.Abstract;

namespace Synology.DS.IoC.Installers
{
    public class Core : NinjectModule
    {
        public override void Load()
        {
			//per call
			Bind<ITorrentFileTransfomer>().To<TorrentFileTransfomer>().InTransientScope();
            Bind<IWebClient>().To<WebClientEx>().InTransientScope();
            Bind<StationAccessor>().ToSelf().InTransientScope();
            Bind<AuthService>().ToSelf().InTransientScope();
            Bind<TaskService>().ToSelf().InTransientScope();

            //singletons
            Bind<ITorrentsWatcher>().To<TorrentsWatcher>().InSingletonScope();
            Bind<IConfigurationManager>().To<ConfigurationManager>().InSingletonScope();
            Bind<IProcessingServer>().To<ProcessingServer>().InSingletonScope();
        }
    }
}
